<?php
class systems{
	function __construct(){
		//$this->db = $GLOBALS['db'];		
	}
	 function redirect($url,$root=false){
			if($root==true)$url = '/'.$url;//要加上当前网站目录
			header('Location: '.$url);
			exit();
	 }
	function db(){
		if(!$this->db){
			$this->db = $GLOBALS['db'];
		}
		return $this->db;		
	}
	
}
?>